/**
 * Created by LiH on 2018/7/19.
 */
export default function (message){
  let devLogger = document.getElementById('Logger');

  if(!devLogger){
    devLogger = document.createElement('div');
    devLogger.id = 'Logger';
    devLogger.style.position = 'fixed';
    devLogger.style.left = '0';
    devLogger.style.top = '0';
    devLogger.style.right = '0';
    devLogger.style.height = '100%';
    devLogger.style.zIndex = '10';
    devLogger.style.backgroundColor = 'rgba(0,0,0,.8)';
    devLogger.style.padding = '10px';
    devLogger.style.color = '#fff';
    devLogger.style.fontSize = '16px';
    devLogger.style.overflow = 'scroll';
    devLogger.style.overflowWrap = 'break-word';
    document.body.appendChild(devLogger);
    devLogger.addEventListener('click', function () {
      devLogger.style.display = 'none';
      devLogger.innerHTML = '';
    });
  }

  devLogger.innerHTML += (message + '</br>');
  devLogger.style.display = 'block'
}
